<?php

use Faker\Generator as Faker;

/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/

$factory->define(App\File::class, function (Faker $faker) {

    return [

        'author' => $faker->name,
        'link' => $faker->url,
        'src_title' => $faker->sentence(8),
        'tgt_title' => $faker->sentence(6),
        'src_excerpt' => $faker->sentence(15),
        'tgt_excerpt' => $faker->sentence(15),
        'cover_img' => $faker->imageUrl(200,200, null,true),
        'industry' => $faker->randomElement(\App\File::$industries),
        'translate_status' => $faker->randomElement(\App\File::$translateStatus),
        'publish_status' => $faker->randomElement(\App\File::$publishStatus),
        'read_count' => random_int(0,500),
        'share_count' => random_int(0,250),
        'src_lang' => $faker->randomElement(['zh-CN', 'en', 'ja']),
        'tgt_lang' => $faker->randomElement(['fr',  'es']),

    ];
});
